# 输出二维数组
def show2d(b):
    for i in range(len(b)):
        for j in range(len(b[i])):
            print(b[i][j], end=" ")
        print()


# 创建一个二维数组 长度为row 宽度为col
def create2d(row, col):
    b = []
    for i in range(row):
        b.append(list([0] * col))
    return b


def main():
    b = create2d(3, 4)
    for i in range(len(b)):
        b[i] = list(map(int, input().split()))

    C = create2d(len(b[0]), len(b))

    for i in range(len(C)):
        for j in range(len(C[i])):
            C[i][j] = b[j][i]
    show2d(C)


main()
